<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />


<div class="t_bar">
	首席农艺师名单（至少30个农民专业合作社或涉农企业）
	<security:authorize ifNotGranted="A_DAILU_PROPOSAL">
	<!-- <span style="font-size: 12px;font-weight: normal;">
		（如果您需要修改申请人信息， 请保存申请书后点击菜单“管理”>“个人信息维护”完成修改）
	</span> -->
	</security:authorize>
</div>
	<table  id="ny_persons" cellpadding="0" class="table01" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;" >
		<thead>
			<tr>
            <th class="TblHead" align="center" nowrap width="4%">序号</th>
				<th class="TblHead" align="center" width="7%">姓名</th>
				<th class="TblHead" align="center" width="5%">性别</th>
				<th class="TblHead" align="center" width="13%">出生年月</th>
				<th class="TblHead" align="center" width="10%">从事专业/职称</th>
				<th class="TblHead" align="center" width="20%">所在单位</th>
				<th class="TblHead" align="center" width="11%">手机号码</th>
				<th class="TblHead" align="center" width="10%">服务的农民专业合作社（涉农企业）名称/理事长姓名</th>
				<th class="TblHead" align="center" width="11%">理事长<br />手机号码</th>
			</tr>
		</thead>
		<tbody id="tab">
			<c:set value="0" var="index" scope="page" />
			<x:forEach select="$xmlData/data/ny_persons/ny_person" var="ny_person">
				<c:choose>
					<c:when test="${index<10}">
						<c:set value="0" var="flag" scope="page" />
					</c:when>
					<c:otherwise>
						<c:set value="" var="flag" scope="page" />
					</c:otherwise>
				</c:choose>
				<tr>
					<td align="center">
					<span name="ny_persons/ny_person[${flag}${index}]@seq_no">${index+1}</span>
					</td>
					<td align="center">
						<x:out select="$ny_person/zh_name" />
						<%-- <security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
						<c:if test="${index==0 }"><a href="###" class="Blue" style="text-decoration: none;" onclick="selectFirstRadio(this);editRow('ny_persons','${ctx}/proposal/edit/dialog/psnInfoEdit_sxry?parentTab=ny_persons&type=edit&needMeetingInfo=${param.needMeetingInfo}&psnCode=<x:out select="$ny_person/psn_code" />&TB_iframe=true&height=440&width=900','编辑项目参与人信息')">[&nbsp;设置&nbsp;]</a></c:if>
						</security:authorize> --%>
					</td>
					<td align="center">
						<x:out select="$ny_person/gender_name" />
					</td>
					<td align="center">
						<x:out select="$ny_person/birthday" />
					</td>
					<td align="center">
						<x:out select="$ny_person/position" />
					</td>
					
					<td align="center">
						<x:out select="$ny_person/org_name" />
					</td>
					<td align="center"> 
						<x:out select="$ny_person/mobile" />
					</td>
					<td align="center">
						<x:out select="$ny_person/chairman_name" />
					</td>
					<td align="center">
						<x:out select="$ny_person/chairman_mobile" />
					</td>
				</tr>
				<c:set value="${index+1}" var="index" scope="page" />
			</x:forEach>
			</tbody>
	</table>
	 
<script type="text/javascript">
function selectFirstRadio(obj) {
	$(obj).parent('td').parent('tr').find('input[type="radio"]').attr("checked","checked");
	setSubmitPsn();
}
/* function checkSubmitPsn(tableId){
	<security:authorize ifNotGranted="A_DAILU_PROPOSAL">
	var tr=$("#"+tableId+" :radio:checked").parents("tr");
	if(tr.length!=0 && tr.get(0).rowIndex==2){
		scmWarn('如果您需要修改申请人信息， 请保存申请书后点击菜单“管理”>“个人信息维护”完成修改');
		return false;
	}
	</security:authorize>
	
	return true;
		
} */
/* function psnSynchro(){
	$("span[name$='fzr_psnname']").text($("#ny_persons tr:eq(2)").find("span[name$='zh_name']").text());
	$("span[name$='fzr_tel']").text($("#ny_persons tr:eq(2)").find("input[name$='contact/tel_work']").val());
	$("span[name$='fzr_mobile']").text($("#ny_persons tr:eq(2)").find("input[name$='contact/mobile']").val());
	$("span[name$='fzr_mail']").text($("#ny_persons tr:eq(2)").find("input[name$='contact/email']").val());
} */

function setSubmitPsn() {
	if($("#ny_persons :radio:checked").length==0){
		scmWarn('请选择一行!');
		return false;
	}
	var tr = $("#ny_persons :radio:checked").parents("tr");
	if (tr.get(0).rowIndex - 1 == 1) {// 如果选择的是申报人
		$("#zh_psnPrev").attr("disabled", "true").css("color", "#808080");
		//$("#zh_psnNext").attr("disabled", "true").css("color", "#808080");
		// $("#zh_psnEdit").attr("disabled","true").css("color","#808080");
		//$("#zh_psnDel").attr("disabled", "true").css("color", "#808080");

	} else {// 如果是申报书的下一行
		$("#zh_psnPrev").removeAttr("disabled").css("color", "#003366");
		//$("#zh_psnNext").removeAttr("disabled").css("color", "#003366");
		//$("#zh_psnDel").removeAttr("disabled").css("color", "#003366");
	} 
}
</script>